<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>1</title>
    <link rel="stylesheet" href="lib/bootstrap@3.3.4/css/bootstrap.min.css">

    <style>
    
    
    </style>
</head>
<body>
    <div id="content">
<form>
<div class="aa">


    <label for="as">姓名:</label><br/>
    <input type="text" value="李美江" id="as" class="af" placeholder="名字">
</div>
<div class="bb">


        <label for="bs">傻逼度:</label><br/>
        <input type="text" value="100" id="bs" class="bf" placeholder="傻逼度满为100">
    </div>
    <div class="cc">


            <label for="cs">性别:</label><br/>
            <input type="text" value="人妖" id="cs" class="cf" placeholder="男.女或人妖">
        </div>
       <button type="submit" class="ee">提交</button>

</form>


<table border="1">
<thead>

    <tr>
        <td>姓名</td>
        <td>傻逼度</td>
        <td>性别</td>
        <td>功能</td>

    </tr>
</thead>
<tbody>

    <tr>
        <td></td>
        <td></td>
        <td></td>
        <td>
            <button class="gg">删除</button>
            <button class="ff">修改</button>
        </td>

    </tr>
</tbody>
    
</table>

    </div>

<script src="jquery3.0.js"></script>
    <script>
        //获取
        var ee = document.querySelector('.ee');

        ee.onclick = function(e){

            e.preventDefault();

            var obj = {};

            obj.nane = as.value;
            
            obj.sbd = bs.value;

            obj.xing = cs.value;

            console.log(obj);
            //吧obj 存到localstorage

        //   localStorage.setItem('lis1',JSON.stringify(obj));
          var all = localStorage.getItem('listNew');

          if(all){

        all = JSON.parse(all);
         all.push(obj);
        

        localStorage.setItem('listNew',JSON.stringify(all));

          }else{

  localStorage.setItem('listNew',JSON.stringify(obj));

          }
         
        
        }
        
        
    </script>
</body>
</html>